﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using ASPMVC_first_app.Models;


namespace ASPMVC_first_app.Dtos
{
    public class MovieDto
    {
        public int Id { get; set; }
        [Required(ErrorMessage = "Please input name!")]
        public string Name { get; set; }

        public Genre Genre { get; set; }

        [Required(ErrorMessage = "Please input genre name!")]
        public int GenreId { get; set; }

        [Required(ErrorMessage = "Please input description!")]
        public string Description { get; set; }

        [Required(ErrorMessage = "Please input date!")]
        public DateTime Received { get; set; }

        [Min1Max20movies]
        [Required(ErrorMessage = "Please input count!")]
        public int Count { get; set; }
    }
}